<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8"></meta>
<title>定时任务管理</title>
<script type="text/javascript" src="/lib/jquery/jquery.min-v2.1.4.js"></script>
<script type="text/javascript" src="/lib/easyUi/jquery.easyui.min.js"></script>
<link rel="stylesheet" type="text/css"
	href="/lib/easyUi/themes/icon.css" />
<link rel="stylesheet" type="text/css"
	href="/lib/easyUi/themes/default/easyui.css" />

<script type="text/javascript" src="/lib/js/baseTask.js"></script>
</head>

<body>
	<table id="dg" title="定时任务列表" class="easyui-datagrid" fitColumns="true"
		pagination="true" rownumbers="true" url="/task/list" fit="true"
		toolbar="#tb" method="get">
		<thead>
			<tr>
				<th field="cb" checkbox="true" align="center"></th>
				<th field="id" width="100" align="center">编号</th>
				<th field="taskName" width="100" align="center">项目名称</th>
				<th field="restartCycleDesc" width="200" align="center">重启周期</th>
				<th field="scriptPath" width="200" align="center">脚本路径</th>
				<th field="type" width="200" align="center">项目类型</th>
			</tr>
		</thead>
	</table>

	<!-- 菜单栏 -->
	<div id="tb">
		<div>
			<!--plain="true"去掉边框-->
			<a href="javascript:openLinkAddDialog()" class="easyui-linkbutton"
				iconCls="icon-add" plain="true">添加</a> <a
				href="javascript:openLinkModifyDialog()" class="easyui-linkbutton"
				iconCls="icon-edit" plain="true">修改</a> <a
				href="javascript:deleteLink()" class="easyui-linkbutton"
				iconCls="icon-remove" plain="true">删除</a>
		</div>
		<div>
			&nbsp;项目名称：&nbsp;<input type="text" id="s_name" size="20" /> <a
				id="search" href="javascript:searchWebSite()"
				class="easyui-linkbutton" iconCls="icon-search" plain="true">搜索</a>
		</div>
	</div>

	<!-- 修改框内容 -->
	<div id="dlg" class="easyui-dialog"
		style="width: 550px; height: 340px; padding: 10px 20px" closed="true"
		buttons="#update-buttons">
		<form id="fm" method="post">
			<table cellspacing="8px">
				<tr>
					<td>编号：</td>
					<td><input type="text" id="id" name="id"
						class="easyui-validatebox" required="true" editable="false" /></td>
				</tr>
				<tr>
					<td>项目名称：</td>
					<td><input type="text" id="taskName" name="taskName"
						class="easyui-validatebox" required="true" /></td>
				</tr>
				<tr>
					<td>项目类型：</td>
					<td><select id="typeEdit" name="type"
						class="easyui-combobox" style="width: 150px; text-align: center;"
						panelHeight="auto" />
						<option value="JAR">JAR</option>
						<option value="EXE">EXE</option></select></td>
				</tr>
				<tr>
					<td>重启周期：</td>
					<td><select id="intervalEdit" name="interval"
						class="easyui-combobox" style="width: 150px; text-align: center;"
						panelHeight="auto" />
						<option value="day">每日</option>
						<option value="week">每周</option>
						<option value="fixed">固定周期</option> </select> <select id="dateEdit"
						name="date" class="easyui-combobox"
						style="width: 80px; text-align: center;" panelHeight="auto" />
						<option value="10">---</option>
						<option value="1">星期一</option>
						<option value="2">星期二</option>
						<option value="3">星期三</option>
						<option value="4">星期四</option>
						<option value="5">星期五</option>
						<option value="6">星期六</option>
						<option value="0">星期天</option> </select> <select id="intervalTimeEdit"
						name="fixedType" class="easyui-combobox"
						style="width: 80px; text-align: center;" panelHeight="auto" />
						<option value="10">---</option>
						<option value="1">分钟</option>
						<option value="2">小时</option> </select> <input type="text"
						id="fixedTimeEdit" name="fixedTime" class="easyui-numberbox"
						style="width: 60px; text-align: center;" required="true" /></td>
				</tr>
				<tr>
					<td>时间：</td>
					<td><input id="dtEdit" name="dt" class="easyui-timespinner"
						style="width: 100px;" showSeconds="false"></td>
				</tr>
				<tr>
					<td>脚本路径：</td>
					<td><input id="filePathEdit" class="easyui-filebox"
						name="scriptPath" data-options="prompt:'Choose a file...'"
						style="width: 100%" /></td>
				</tr>
			</table>
		</form>
	</div>

	<div id="add" class="easyui-dialog"
		style="width: 550px; height: 310px; padding: 10px 20px" closed="true"
		buttons="#add-buttons">
		<form id="fms" method="post">
			<table cellspacing="8px">
				<tr>
					<td>项目名称：</td>
					<td><input type="text" id="taskNameAdd" name="taskName"
						class="easyui-validatebox" required="true" /></td>
				</tr>
				<tr>
					<td>项目类型：</td>
					<td><select id="typeAdd" name="type"
						class="easyui-combobox" style="width: 150px; text-align: center;"
						panelHeight="auto" data-options="editable:false"/>
						<option value="JAR">JAR</option>
						<option value="EXE">EXE</option></select></td>
				</tr>
				<tr>
					<td>重启周期：</td>
					<td><select id="intervalAdd" name="interval"
						class="easyui-combobox" style="width: 150px; text-align: center;"
						panelHeight="auto"/>
						<option value="day">每日</option>
						<option value="week">每周</option>
						<option value="fixed">固定周期</option> </select> <select id="dateAdd"
						name="date" class="easyui-combobox"
						style="width: 80px; text-align: center;" panelHeight="auto" />
						<option value="10">---</option>
						<option value="1">星期一</option>
						<option value="2">星期二</option>
						<option value="3">星期三</option>
						<option value="4">星期四</option>
						<option value="5">星期五</option>
						<option value="6">星期六</option>
						<option value="0">星期天</option> </select> <select id="intervalTimeAdd"
						name="fixedType" class="easyui-combobox"
						style="width: 80px; text-align: center;" panelHeight="auto" />
						<option value="10">---</option>
						<option value="1">分钟</option>
						<option value="2">小时</option> </select> <input type="text"
						id="fixedTimeAdd" name="fixedTime" class="easyui-numberbox"
						style="width: 60px; text-align: center;" required="true" /></td>
				</tr>
				<tr>
					<td>时间：</td>
					<td><input id="dtAdd" name="dt" class="easyui-timespinner"
						style="width: 100px;" showSeconds="false"></td>
				</tr>
				<tr>
					<td>脚本路径：</td>
					<td><input id="filePathAdd" class="easyui-filebox"
						name="scriptPath" data-options="prompt:'Choose a file...'"
						style="width: 100%" required="true" /></td>
				</tr>
			</table>
		</form>
	</div>

	<!-- 增加对话框的 save、close 按钮 -->
	<div id="add-buttons">
		<a href="javascript:saveLink()" class="easyui-linkbutton"
			iconCls="icon-ok">保存</a> <a href="javascript:closeLinkDialog()"
			class="easyui-linkbutton" iconCls="icon-cancel">关闭</a>
	</div>

	<!-- 修改对话框的 save、close 按钮 -->
	<div id="update-buttons">
		<a href="javascript:updateLink()" class="easyui-linkbutton"
			iconCls="icon-ok">保存</a> <a href="javascript:closeUpLinkDialog()"
			class="easyui-linkbutton" iconCls="icon-cancel">关闭</a>
	</div>

</body>

</html>